﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="XemThongTinGioHang.aspx.cs" Inherits="XemThongTinGioHang" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="place1" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="place2" runat="Server">
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td class="title">
                Thông Tin Giỏ Hàng</td>
        </tr>
        <tr class="separator">
            <td style="height: 13px">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="GridTitle">
                Danh Sách Sản Phẩm</td>
        </tr>
        <tr>
            <td>
                <div id="DIVWithScrolling" runat="server">
                    <div id="DIVContainer" runat="server">
                        <asp:GridView ID="grdProducts" runat="server" AutoGenerateColumns="False" AllowPaging="True" OnRowCommand="grdProducts_RowCommand" >
                            <Columns>
                                <asp:TemplateField HeaderText="M&#227; Sản Phẩm">
                                    <ItemTemplate>
                                        <asp:Label ID="lblBasketId" runat="server" Text='<%# Bind("MaSanPham") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" Width="50px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="T&#234;n">
                                    <ItemTemplate>
                                        <asp:Label ID="lblName" runat="server" Text='<%# Bind("TenSanPham") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" Width="50px"/>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Gi&#225;">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCost" runat="server" Text='<%# Bind("DonGia") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" Width="50px"/>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Ng&#224;y Đặt">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTypeName" runat="server" Text='<%# Bind("NgayDat") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" Width="70px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="H&#236;nh Ảnh">
                                    <ItemTemplate>                                        
                                        <asp:Image ID="image" ImageUrl='<%# Bind("Image") %>' runat="server" />                                   
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" Width="70px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Số Lượng">
                                    <ItemStyle Width="130px" />
                                    <HeaderStyle Width="130px" />
                                    <ItemTemplate>
                                        <asp:TextBox  ID= "txtSoLuong" EnableViewState="False" Width="100px" runat="server" Text='<%# Bind("SoLuong")   %>'></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="X&#243;a">
                                    <HeaderStyle HorizontalAlign="Left" Width="70px" />
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkDelete" CommandName='xoa' OnClientClick="return confirm('Bạn có chắc muốn xóa user này không ?')"
                                            CommandArgument='<%#Eval("MaSanPham")%>' runat="server">Xoá</asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ShowEditButton="True" EditText="Cập nhật" HeaderText="Cập nhật" />
                            </Columns>
                        </asp:GridView>
                    </div>
                </div>
                <div>
                     <table width="100%">
                        <tr align="center">
                            <td>
                            <asp:Button ID="btnTiepTucMua" runat="server" Text="Tiếp tục mua hàng" CssClass="Button" OnClick="btnTiepTucMua_Click" />
                            <asp:Button ID="btnThanhToan" runat="server" Text="Thanh toán" CssClass="Button" OnClick="btnThanhToan_Click" />
                            <asp:Button ID="btnLuu" runat="server" Text="Lưu đơn  hàng" CssClass="Button" OnClick="btnLuu_Click" />
                            <asp:Button ID="btnXoa" runat="server" Text="Xóa đơn hàng" CssClass="Button" OnClick="btnXoa_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td align="right">
                <%--<form id="form2" runat="server">
                <asp:Button ID="btnUpdate" runat="server" Text="Update" CssClass="Button" />
                </form>--%>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="place3" runat="Server">
</asp:Content>
